package com.android.yummycookies.activeBoard;

import com.android.yummycookies.commonInterface.IGameEngine;
import com.android.yummycookies.util.Validator;


public abstract class AbstractGameEngine implements IGameEngine {

	public static final String TAG = AbstractGameEngine.class.getSimpleName();
	
	private final int maxHeightCookies;
	private final int maxWidthCookies;

	public AbstractGameEngine(int maxHeightCookies, int maxWidthCookies) {
		
		Validator.checkGreaterThan(TAG, "max height cookies number", maxHeightCookies, "min height cookies number constant", CookieBoard.BOARD_MIN_HEIGHT_COOKIES);
		Validator.checkLesserThan(TAG, "max height cookies number", maxHeightCookies, "max height cookies number constant", CookieBoard.BOARD_MAX_HEIGHT_COOKIES);
		
		Validator.checkGreaterThan(TAG, "max width cookies number", maxWidthCookies, "min width cookies number", CookieBoard.BOARD_MIN_WIDTH_COOKIES);
		Validator.checkLesserThan(TAG, "max width cookies number", maxWidthCookies, "max width cookies number", CookieBoard.BOARD_MAX_WIDTH_COOKIES);
		
		this.maxHeightCookies = maxHeightCookies;
		this.maxWidthCookies = maxWidthCookies;
	}

	public int getMaxHeightCookies() {
		return maxHeightCookies;
	}

	public int getMaxWidthCookies() {
		return maxWidthCookies;
	}

	
}
